package com.hushao.aimi.service;

import com.hushao.aimi.common.ServerResponse;
import com.hushao.aimi.vo.UserVo;
import org.springframework.data.domain.Pageable;

public interface UserService {

    /**
     * 根据用户名查询（分页）
     * @param username

     * @param pageable
     * @return
     */
    ServerResponse findAllByUsernameLike(String username, Pageable pageable);

    /**
     * 获取个人信息
     * @param username
     * @return
     */
    ServerResponse getUser(String username);


    ServerResponse addUser(UserVo user)throws Exception;

    /**
     * 是删除用户
     * @param userId
     * @return
     * @throws Exception
     */
    ServerResponse delUser(String userId)throws Exception;

    /**
     * 修改用户
     * @param user
     * @throws Exception
     * @return
     */
    ServerResponse update(UserVo user)throws Exception;

    Long count();
}
